1 # Solving partial differential equations by descretizing space
2 # This is an adoption of the application note “alpaca_23” from Anabrid [https://analogparadigm.com/downloads/alpaca_23.pdf]
3 # THAT only has 5 integrators, thus we have to reduce the number of elements
6 # u''_1 = u_0 - 2*u_1 + u_2
7 # u''_2 = u_1 - 2*u_2 + u_3
10 coefficient(1): f1 # fix to 0.2 to get 2 for the integration
11 coefficient(2): f2 # fix to 0.2 to get 2 for the integration
12 coefficient(5): 1 -> delta_t
14 coefficient(6): 0 -> u_3
16 iintegrate u_0, 10*:-f1u_1, u_2 -> -u'_1 # input is u''_1
17 iintegrate -u'_1 -> u_1
21 iintegrate u_1, 10*:-f2u_2, u_3 -> -u'_2 # input is u''_2
22 iintegrate -u'_2 -> u_2